const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');

module.exports = {
  title: '技术学习导航',
  tagline: '快速构建优化的技术学习网站',
  url: 'https://your-docusaurus-site.example.com',
  baseUrl: '/',
  onBrokenLinks: 'throw',
  onBrokenMarkdownLinks: 'warn',
  favicon: 'img/logo.svg',
  organizationName: 'facebook',
  projectName: 'docusaurus',

  i18n: {
    defaultLocale: 'zh-Hans',
    locales: ['zh-Hans'],
  },

  presets: [
    [
      'classic',
      {
        docs: {
          sidebarPath: require.resolve('./sidebars.js'),
          editUrl: 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
        },
        blog: false,
        theme: {
          customCss: require.resolve('./src/css/custom.css'),
        },
      },
    ],
  ],

  themeConfig: {
    navbar: {
      title: 'Zfank',
      logo: {
        alt: 'Zfank Logo',
        src: 'img/logo.svg',
      },
      items: [
        {
          label: '编程语言',
          position: 'left',
          items: [
            {
              label: 'Python',
              to: '/docs/python',
            },
            {
              label: 'Go',
              to: '/docs/go',
            },
          ],
        },
        {
          label: '数据库',
          position: 'left',
          items: [
            {
              label: 'MySQL',
              to: '/docs/mysql',
            },
            {
              label: 'PostgreSQL',
              to: '/docs/postgresql',
            },
          ],
        },
        {
          label: 'Linux操作系统',
          position: 'left',
          to: '/docs/linux',
        },
        {
          label: 'Docker',
          position: 'left',
          to: '/docs/docker',
        },
        {
          label: 'Git',
          position: 'left',
          to: '/docs/git',
        },
        {
          href: 'https://github.com/facebook/docusaurus',
          label: 'GitHub',
          position: 'right',
        },
      ],
    },
    footer: {
      style: 'dark',
      links: [
        {
          title: '编程语言',
          items: [
            {
              label: 'Python',
              to: '/docs/python',
            },
            {
              label: 'Go',
              to: '/docs/go',
            },
          ],
        },
        {
          title: '数据库',
          items: [
            {
              label: 'MySQL',
              to: '/docs/mysql',
            },
            {
              label: 'PostgreSQL',
              to: '/docs/postgresql',
            },
          ],
        },
        {
          title: '系统工具',
          items: [
            {
              label: 'Linux',
              to: '/docs/linux',
            },
            {
              label: 'Docker',
              to: '/docs/docker',
            },
            {
              label: 'Git',
              to: '/docs/git',
            },
          ],
        },
      ],
      copyright: `Copyright © ${new Date().getFullYear()} Zfank | <a href='http://beian.miit.gov.cn/'>陕ICP备2025078223号</a>`
      
    },
    prism: {
      theme: lightCodeTheme,
      darkTheme: darkCodeTheme,
    },
  },
};